﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

namespace BSCMFF.Web.UserControls.Selections
{
    public partial class SurveySelection : System.Web.UI.UserControl
    {
        public int PublicSelectedValue
        {
            get
            {
                if (RadComboBoxSurveys.SelectedValue == "")
                {
                    return 0;
                }
                else
                {
                    return Int32.Parse(RadComboBoxSurveys.SelectedValue);
                }

            }
            set
            {
                if (value != 0)
                {
                    RadComboBoxSurveys.SelectedValue = value.ToString();
                }
            }
        }

        //public string PublicSelectedSurvey
        //{
        //    get
        //    {
        //        return RadComboBoxSurveys.SelectedItem.Text;
        //    }
        //}


        public event EventHandler SurveySelectedIndexChanged;

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void RadComboBoxSurveys_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            if (SurveySelectedIndexChanged != null)
            {
                SurveySelectedIndexChanged(this, e);
            }
        }
    }
}